﻿package plugin.union
{
    import cmd.*;
    import com.core.*;

    public class UnionControl extends Control
    {

        public function UnionControl(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function update(param1:Obproxy, param2:ProxyChange) : void
        {
            if (param1.getName() == "union")
            {
                switch(param2.property)
                {
                    case "getUnionList":
                    {
                        this.target.update(CMDUnion._3GETUNIONLIST, param2.newvalue);
                        break;
                    }
                    case "getUnionInfo":
                    {
                        this.target.update(CMDUnion._5GETUNIONINFO, param2.newvalue);
                        break;
                    }
                    case "autoAddSet":
                    {
                        this.target.update(CMDUnion._18AUTOADD, param2.newvalue);
                        break;
                    }
                    case "getSalaryInfo":
                    {
                        this.target.update(CMDUnion._27GETSALARYINFO, param2.newvalue);
                        break;
                    }
                    case "getTotem":
                    {
                        this.target.update(CMDUnion._32GETTOTEM, param2.newvalue);
                        break;
                    }
                    case "upTotem":
                    {
                        this.target.update(CMDUnion._34UPTOTEM, param2.newvalue);
                        break;
                    }
                    case "changePosition":
                    {
                        this.target.update(CMDUnion._46CHANGEPOSITION, param2.newvalue);
                        break;
                    }
                    case "updateMembers":
                    {
                        this.target.update(CMDUnion._22MEMBERLEAVE, null);
                        break;
                    }
                    case "refer":
                    {
                        this.target.update(CMDUnion._42REFER, null);
                        break;
                    }
                    case "getCkInfo":
                    {
                        this.target.update(CMDUnion._51GETCKINFO, param2.newvalue);
                        break;
                    }
                    case "ckChange":
                    {
                        this.target.update(CMDUnion._55TOGETCK, param2.newvalue);
                        break;
                    }
                    case "updateContribution":
                    {
                        this.target.update(UnionPublics.UPDATECONTRIBUTION, param2.newvalue);
                        break;
                    }
                    case "updateBag":
                    {
                        this.target.update(UnionPublics.UPDATEBAG, param2.newvalue);
                        break;
                    }
                    case "todonation":
                    {
                        this.target.update(UnionPublics.TODONATE, param2.newvalue);
                        break;
                    }
                    case "unionBossOpen":
                    {
                        this.target.update(CMDUnion._56UNIONBOSSOPEN, param2.newvalue);
                        break;
                    }
                    case "unionEmsState":
                    {
                        this.target.update(CMDUnion._59UNIONEMSSTATE, param2.newvalue);
                        break;
                    }
                    case "redpacket":
                    {
                        this.target.update(CMDUnion._67ResRedPacketInfo, param2.newvalue);
                        break;
                    }
                    case "showgetmoney":
                    {
                        this.target.update(CMDUnion._70ResGetRedPacket, param2.newvalue);
                        break;
                    }
                    case "getDebug":
                    {
                        this.target.update(UnionPublics.GETDEBUG, null);
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
            }
            return;
        }// end function

    }
}
